package map.android.baidu.carpool.widget.wheel;

import java.util.ArrayList;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import map.android.baidu.carpool.R;

/**
 * Created by zhaoyangyang on 2015/3/24.
 */
public class CareMsgAdapter extends AbstractWheelTextAdapter {

    ArrayList<String> msg = null;

    /**
     * Constructor
     */
    public CareMsgAdapter(Context context, ArrayList<String> msg) {
        super(context, R.layout.car_wheel_text_item, NO_RESOURCE);
        this.msg = msg;
        setItemTextResource(R.id.car_reservation_wheelview_text);
    }

    @Override
    public View getItem(int index, View cachedView, ViewGroup parent) {
        View view = super.getItem(index, cachedView, parent);
        return view;
    }

    @Override
    public int getItemsCount() {
        return msg.size();
    }

    @Override
    protected CharSequence getItemText(int index) {
        return msg.get(index);
    }

}
